package com.jvm.shk;

/**
 * @author ：qs
 * @date ：Created in 2022/1/11
 * @description：
 * @modified By：
 */
public class OperandStackTest {
    public static void main(String[] args) {
        new OperandStackTest().test();

    }

    public void test() {

        int i1 = 10;
        System.out.println("----1----" + i1++); // 10

        int i2 = 10;
        System.out.println("----2----" + ++i2); // 11


        int i3 = 10;
        int i4 = i3++;
        System.out.println("----4----" + i4); // 10

        int i5 = 10;
        int i6 = ++i5;
        System.out.println("----6----" + i6); // 11
        System.out.println("----5----" + i5); // 11  i5自增了

        int i7 = 10;
        i7 = i7++;
        System.out.println("----7----" + i7); // 10

        int i8 = 10;
        i8 = ++i8;
        System.out.println("----8----" + i8); // 11

        int i9 = 10;
        int i10 = i9++ + ++i9;
        System.out.println("----10----" + i10);// 21

    }

    public void test7() {
        int i7 = 10;
        i7 = i7++;
    }

    public void testAddOperation() {
        //byte、short、char、boolean：都以int型来保存
        byte i = 15;
        int j = 8;
        int k = i + j;

        // int m = 800;
    }
}
